<?php
namespace Home\Controller;

use Think\Controller;

/**
* CommonController
*/
class CommonController extends Controller {
    /**
    * 全局初始化
    * @return
    */
    public function _initialize() {
        // utf-8编码
        header('Content-Type: text/html; charset=utf-8');

        if (!cookie('wx_id') && isset($_GET['wx_id'])) {
            cookie('wx_id', $_GET['wx_id']);
        }
    }

    /**
    * 空操作处理
    * @return
    */
    public function _empty() {
        $this->redirect('Index/index');
    }
}
